package com.ruoyi.shop.api;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.shop.api.domain.ErpSellerStoreEmpower;
import com.ruoyi.shop.api.domain.ErpSellerStoreEmpowerExtend;
import com.ruoyi.shop.api.domain.ErpSellerStorePromotionActivity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(contextId = "remoteSellerStoreService", value = ServiceNameConstants.SHOP_SERVICE)
public interface RemoteSellerStoreService {

    /**
     * 获取店铺信息
     */
    @GetMapping("/seller/sellerStoreEmpower/{id}")
    R<Object> getSellerStoreInfoById(@PathVariable("id") Long id);

    /**
     * 获取店铺信息（包含删除的）
     */
    @GetMapping("/seller/sellerStoreEmpower/getCompriseDeleteById")
    ErpSellerStoreEmpower getCompriseDeleteById(@RequestParam("id") Long id);

    /**
     * 根据storeUserName查询店铺绑定信息
     * @param sellerLoginId
     * @return
     */
    @GetMapping("/seller/sellerStoreEmpower/getSellerStoreEmpowerByCnCode/{sellerLoginId}")
    R<Object> getSellerStoreEmpowerByCnCode(@PathVariable("sellerLoginId") String sellerLoginId);

    /**
     * 根据storeUserName查询所有授权店铺绑定信息（含删除的）
     * @param sellerLoginId
     * @return
     */
    @GetMapping("/seller/sellerStoreEmpower/getStoreEmpowerListByCnCode/{sellerLoginId}")
    R<Object> getStoreEmpowerListByCnCode(@PathVariable("sellerLoginId") String sellerLoginId);

    /**
     * 根据店铺ID，查询店铺绑定信息
     * @param storeId
     * @return
     */
    @GetMapping("/seller/sellerStoreEmpower/getSellerStoreEmpowerByStoreId/{storeId}")
    R<Object> getSellerStoreEmpowerByStoreId(@PathVariable("storeId") String storeId);

    @GetMapping("/seller/sellerStoreEmpower/getEmpowerStore")
    R<Object> getEmpowerStore();

    @PostMapping("/seller/sellerStoreEmpowerExtend/getSellerStoreExtendInfo")
    R<Object> getSellerStoreExtendInfo(@RequestBody ErpSellerStoreEmpowerExtend storeExtendSel);

    @GetMapping("/seller/sellerStoreEmpowerExtend/getSellerStoreExtendInfoByStoreId/{storeId}")
    R<Object> getSellerStoreExtendInfoByStoreId(@PathVariable("storeId") String storeId);


    @GetMapping("system/sellerStoreSubcategory/getSubcategoryByStoreIdAndCategoryId/{storeId}/{categoryId}")
    R<Object> getSubcategoryByStoreIdAndCategoryId(@PathVariable("storeId") Long storeId, @PathVariable("categoryId") Long categoryId);

    @GetMapping("/seller/sellerStoreCookie/getCookieByStoreId/{storeId}")
    String getCookieByStoreId(@PathVariable("storeId") Long storeId);

    @GetMapping("/seller/sellerStoreCookie/getChannelId/{storeId}")
    String getChannelByStoreId(@PathVariable("storeId") Long storeId);

    @PostMapping("/seller/sellerStorePromotionActivity/getPromotionActivityInfo")
    R<Object> getPromotionActivityInfo(@RequestBody ErpSellerStorePromotionActivity activity);

    @GetMapping("/seller/storeCategoryBrand/queryStoreBrandInnerAuth/{categoryId}/{sellerProductId}/{storeId}")
    R<Object> queryStoreBrandInnerAuth(
            @PathVariable("categoryId") Long categoryId,
            @PathVariable("sellerProductId") Long sellerProductId,
                                       @PathVariable("storeId") Long storeId);

    @PostMapping("/seller/sellerStoreEmpower/getSellerStoreListByInfo")
    R<Object> getSellerStoreListByInfo(@RequestBody ErpSellerStoreEmpower storeEmpower);

    @PostMapping("/seller/sellerStoreEmpower/selectEmpowerInUserName")
    R<Object> selectEmpowerInUserName(@RequestBody List<String> collect);

    @GetMapping("/seller/sellerStoreCookie/setCommission/{storeId}/{aeProductId}/{afflicateDiscount}")
    R<Object> setCommission(
            @PathVariable("storeId") Long storeId,
            @PathVariable("aeProductId") Long aeProductId,
            @PathVariable("afflicateDiscount") Integer afflicateDiscount);
}
